package main

import (
	"fmt"
	"math"
)

type shape interface {
	area() float64
}

type circle struct {
	radius float64
}

type square struct {
	side float64
}

func (c circle) area() float64 {
	return math.Pi * c.radius * c.radius
}

func (s square) area() float64 {
	return s.side * s.side
}

func showAreas(shapes ...shape) {
	for _, s := range shapes {
		fmt.Printf("%T\n", s)
		fmt.Println(s.area())
	}
}

func main() {
	c := circle{3}
	sq := square{2}
	showAreas(c, sq)
}
